<template></template>

<script lang="ts">
import { defineComponent, h } from "vue";
import * as Icon from "@ant-design/icons-vue";
export default defineComponent({
  name: "AntdIcon",
  props: {
    name: {
      type: String,
      required: true,
    },
  },
  setup(props) {
    const Icons: { [key: string]: any } = Icon;
    if(!(Icons[props.name])) {
      console.error(`Icon: ${props.name} is not found!`);
      return {}
    }
    return () => [h(Icons[props.name])];
  },
});
</script>